Comment: My Project Setup Project
Set Variable EXCLUDE_PREREQUISITES to FALSE
Set Variable MY_OPTION to NOTHING
 
MessageBox: CMDLINE value, $CMDLINE$
if Variable CMDLINE Contains EXCLUDE_PREREQUISITES=
  Set Variable EXCLUDE_PREREQUISITES to $EXCLUDE_PREREQUISITES$
  MessageBox: EXCLUDE_PREREQUISITES Value, $EXCLUDE_PREREQUISITES$
end
if Variable CMDLINE Contains MY_OPTION=
  Set Variable MY_OPTION to $MY_OPTION$
  MessageBox: MY_OPTION Value, $MY_OPTION$
end
Comment: MessageBox: LOGGED Value, $LOGGED$
Write into Text File $LOGGED$ from Value MANOJ=$MY_OPTION$ (at end of file)
[DEFINE REGION: Check Application Requirements]
[END REGION]
Comment:  
[DEFINE REGION: Check/Install Application Pre-Requisites]
Comment:  
[DEFINE REGION: Check Application Pre-Requisites]
Comment: Comment: Check setup pre-requisites
Comment: Set Variable PREREQ to FALSE
Comment: Set Variable PRELIST to 
Comment: [compiler if Variable BUILDMODE not Equals PATCH]
Comment: if Variable NEEDSUPGRADE Equals TRUE
Comment: Set Variable PREREQ to TRUE
Comment: Set Variable PRELIST to $PRELIST$$NEWLINE$Previous Version Uninstallation
Comment: end
Comment: Include Script: checkmsi20
Comment: [compiler end]
[END REGION]
Comment:  
[DEFINE REGION: Install Application Pre-Requisites]
Comment: Comment: Install setup pre-requisites
Comment: if Variable PREREQ not Equals FALSE
Comment: Display Dialog: prereq, wait for dialog to return (modal)
Comment: if Variable WIZARD Equals CANCEL
Comment: Terminate Installation
Comment: end
Comment: Display Dialog: progressprereq, use as progress dialog (non-modal)
Comment: [compiler if Variable BUILDMODE not Equals PATCH]
Comment: if Variable NEEDSUPGRADE Equals TRUE
Comment: Set Variable REMOVEOLD to 
Comment: Set Variable ERROROLD to 
Comment: Install/Remove MSI Package $PRODUCTCODE$[REMOVE=ALL] (get result into variable REMOVEOLD)
Comment: if Variable REMOVEOLD Equals ERROR
Comment: MessageBox: $TITLE$ Setup, Unable to uninstall old version of $TITLE$. Please uninstall it yourself using Control Panel Add-Remove Programs before attempting to install this product.$NEWLINE$$NEWLINE$$ERROROLD$
Comment: Terminate Installation
Comment: end
Comment: if Variable REMOVEOLD Equals REBOOT
Comment: MessageBox: $TITLE$ Setup, Your computer needs to be restarted before $TITLE$ Setup can continue.$NEWLINE$$NEWLINE$Please save your work in all running programs and click OK to restart your computer. Setup will resume once your computer restarts.$NEWLINE$$NEWLINE$If you click CANCEL, setup will exit. You will have to run setup again at a later time to install $TITLE$.
Comment: if Variable REBOOTNOW Equals OK
Comment: Reboot Computer and Resume Setup
Comment: else
Comment: Terminate Installation
Comment: end
Comment: end
Comment: Set Variable MAINTENANCE to FALSE
Comment: end
Comment: [DEFINE WEB MEDIA Microsoft Windows Installer 2.0]
Comment: Include Script: setupmsi20
Comment: [compiler end]
Comment: Hide Dialog
Comment: end
[END REGION]
Comment:  
[END REGION]
Comment:  
[DEFINE REGION: Define Setup Globals]
Comment: Comment: Define Setup Components
Comment: Define Component: Default
Comment:  
Comment: Comment: Initialize Setup Globals
Comment: Get System Setting Windows NT Kernel (NT4, 2000, XP, 2003, Vista, 2008, 7, 2008 R2, 8, 2012, 8.1, 2012 R2, 10) into ISNT
Comment: Get Folder Location System->Program Files Directory into PROGRAMFILES
Comment: Get Common Folder Location System->Program Files Directory into COMMONFILES
Comment: Get Common Folder Location Start Menu->Programs Group into SHORTCUTFILESALL
Comment: Get Folder Location Start Menu->Programs Group into SHORTCUTFILES
Comment: if Variable SHORTCUTFILESALL Equals 
Comment: Set Variable SHORTCUTFILESALL to $SHORTCUTFILES$
Comment: end
Comment: Get Folder Location System->Desktop Directory into DESKTOPDIR
Comment: Get Folder Location System->Windows Directory into WINDIR
Comment: Get Folder Location System->System Directory into WINSYSDIR
Comment: Get Folder Location Taskbar->Quick Launch Directory into QUICKLAUNCHDIR
Comment: Get Folder Location WWW->WWWRoot into WWWROOTDIR
[END REGION]
Comment:  
[DEFINE REGION: Setup User Interview]
Comment: if Variable MAINTENANCE Equals TRUE
Comment: GoTo Label: Maintenance
Comment: else
Comment: [compiler if Variable BUILDMODE not Equals PATCH]
Comment: Comment: First Time Install
Comment: Set Variable TARGETDIR to $PROGRAMFILES$\$TITLE$
Comment: Set Variable STARTMENU to $TITLE$
Comment: [compiler end]
Comment: end
Comment:  
Comment: wizard loop
Comment: Display Dialog: welcome, wait for dialog to return (modal)
Comment: [compiler if Variable BUILDMODE not Equals PATCH]
Comment: Display Dialog: licensecheck, wait for dialog to return (modal)
Comment: Display Dialog: readme, wait for dialog to return (modal)
Comment: Display Dialog: registration, wait for dialog to return (modal)
Comment: Display Dialog: destination, wait for dialog to return (modal)
Comment: Display Dialog: startmenu, wait for dialog to return (modal)
Comment: [compiler end]
Comment: Display Dialog: startinstallation, wait for dialog to return (modal)
Comment: end
Comment: GoTo Label: Main Install
Comment:  
Comment: label: Maintenance
Comment: Comment: Maintenance Install/Uninstall
Comment: Set Variable UNINSTALL to YES
Comment: MessageBox: $TITLE$ Uninstall, Are you sure you want to uninstall the selected application and all of its components?
Comment: if Variable UNINSTALL Equals NO
Comment: Terminate Installation
Comment: else
Comment: Set Variable REMOVE to TRUE
Comment: end
[END REGION]
Comment:  
[DEFINE REGION: Process (Un)Installation]
Comment: label: Main Install
Comment: Comment: Exit Setup if Wizard Loop cancelled
Comment: if Variable WIZARD Equals CANCEL
Comment: Terminate Installation
Comment: end
Comment:  
Comment: Comment: Prepare to install
Comment: Set Variable PROGRESSTEXT to Installing $TITLE$
Comment: Set Variable SUCCESS to 
Comment: Set Variable LASTERROR to 
Comment: if Variable ALLUSERS Equals TRUE
Comment: Set Variable SHORTCUTFOLDER to $SHORTCUTFILESALL$\$STARTMENU$
Comment: else
Comment: Set Variable SHORTCUTFOLDER to $SHORTCUTFILES$\$STARTMENU$
Comment: end
Comment: Display Dialog: progress, use as progress dialog (non-modal)
Comment:  
Comment: Comment: Modify Target System
[DEFINE REGION: Perform Uninstallation]
Comment: if Variable REMOVE Equals TRUE
Comment: Comment: Uninstall product
Comment: Comment: TO-DO: Insert any additional uninstall commands here
Comment: Apply Uninstall (get result into variable SUCCESS)
Comment: Set Variable PROGRESS to 100
Comment: else
[END REGION]
[DEFINE REGION: Perform First Time or Maintenance Installation]
Comment: Comment: Install/Re-Install product
Comment: Create Shortcut $SHORTCUTFOLDER$\Uninstall #TITLE# to $UNINSTALLLINK$
Comment: [OFFLINE CONTENT]
Comment: [DEFINE WEB MEDIA Default]
Comment: Get Component Default Selection State into Variable SELECTED
Comment: if Variable SELECTED Equals TRUE
Comment: end
Comment: Comment: TO-DO: Insert any additional install commands here
Comment: [compiler if Variable BUILDMODE Equals PATCH]
Comment: Apply Patch (get result into variable SUCCESS)
Comment: [compiler else]
Comment: if Variable ADVERTISE Equals TRUE
Comment: Apply Advertised (get result into variable SUCCESS)
Comment: else
Comment: Apply Install (get result into variable SUCCESS)
Comment: end
Comment: [compiler end]
Comment: Set Variable PROGRESS to 100
Comment: end
[END REGION]
[END REGION]
Comment:  
[DEFINE REGION: Finish Setup]
Comment: Comment: End of Installation
Comment: Hide Dialog
Display Dialog: finish, wait for dialog to return (modal)
Comment: if Variable SILENT Equals FALSE
Comment: if Variable REBOOTCOMPUTER Equals TRUE
Comment: if Variable SUCCESS Equals REBOOT
Comment: Reboot Computer
Comment: end
Comment: end
Comment: if Variable RUNAPP Equals TRUE
Comment: if Variable REMOVE Equals FALSE
Comment: if Variable SUCCESS Equals COMPLETE
Comment: Comment: TO-DO: Insert command that starts your application here
Comment: end
Comment: end
Comment: end
Comment: end
[END REGION]
 
